$("#sedbtn").click(function(){
    console.log("1111")
    var name = $("#name").val(), phone = $("#phone").val() , msg = $("#msg").val(),reg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/ ;

	if(name == null || name == '')  layer.msg('请输入姓名', {icon: 5});	
    else if(!(reg.test(phone)))  layer.msg('请输入正确手机号', {icon: 5});	
    else if(msg == null || msg == '')  layer.msg('留言不能为空', {icon: 5});
    else     sendMail()
}
) 
function sendMail(){
    console.log('1111')
    var data = {
        "phone":phone,"text":msg,"name":name
    }
   axios.post('',{
       params:data,
       headers: {'Content-Type': 'application/json'}//设置header信息
   })
}